﻿using System.Collections.Generic;

public class HttpUtils
{
#if UNITY_EDITOR
    //测试
    public static string IP = "http://192.168.10.100"; //云平台
#else
    public static string IP = "http://192.168.10.100"; //云平台
#endif

    public readonly static string contentUrl = "/pc/special/api/v1/exhibitions/9/areas";

    public readonly static string deviceUrl = "/pc/exhibition/api/v1/equipments/areas/35/equipments";

    public static string token = "";
    /// <summary>
    /// 专场id
    /// </summary>
    //public static int specialExhibitionId = 146;


    public static string GetUrl(string url)
    {
        return IP + url;
    }

   
    //将dic转换成get请求格式参数
    public static string ReturnGetPara(Dictionary<string,object> InfoDic)
     {
        string Context = "";
        foreach (var item in InfoDic)
        {
            Context = Context + item.Key + "=" + item.Value + "&";
        }
        Context += "";
        return Context.Substring(0,Context.Length-1);
     }

    public static void ChangeServer(string url)
    {
        IP = url;
    }
}
